package com.sky.happygos.network;

import com.sky.happygos.model.ChartSimple;
import com.sky.happygos.model.Goods;
import com.sky.happygos.model.ID;
import com.sky.happygos.model.Order;
import com.sky.happygos.model.RestMessage;
import com.sky.happygos.model.Shop;
import com.sky.happygos.model.User;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by qqqqqqq on 2017/4/17.
 */

public interface ApiServiceAuth {
    @GET("api/v1/myShop")
    Call<List<Shop>> myShop();

    @GET("api/v1/goods")
    Call<List<Goods>> goods(@Query("shopid") String shopid);

    @GET("/api/v1/goodsById")
    Call<Goods> goodsById(@Query("goodsId") String goodsId);

    @POST("api/v1/createGoods")
    @Multipart
    Call<Goods> createGoods(@Part List<MultipartBody.Part> parts);


    @POST("api/v1/updateGoods")
    @Multipart
    Call<Goods> updateGoods(@Part List<MultipartBody.Part> parts);

    @POST("api/v1/updateShop")
    @Multipart
    Call<Shop> updateShop(@Part List<MultipartBody.Part> parts);

    @POST("api/v1/createShop")
    @Multipart
    Call<Shop> createShop(@Part List<MultipartBody.Part> parts);

    @GET("api/v1/listShopOrder")
    Call<List<Order>> listOrder(@Query("status") int status);

    @POST("api/v1/finishOrder")
    Call<RestMessage> finishOrder(@Body ID id);

    @POST("api/v1/failOrder")
    Call<RestMessage> failOrder(@Body ID id);

    @POST("api/v1/receiveOrder")
    Call<RestMessage> receiveOrder(@Body ID id);

    @GET("api/v1/getToday")
    Call<ChartSimple> getTodayChart();

    @GET("api/v1/getMonth")
    Call<ChartSimple> getMonthChart();

    @GET("api/v1/getMonthChartOrder")
    Call<List<Order>> getMonthData();

    @GET("api/v1/getYearChartOrder")
    Call<List<Order>> getYearData();

    @GET("api/v1/me")
    Call<User> getMe();

    @POST("api/v1/updateUser")
    @Multipart
    Call<User> updateUser(@Part List<MultipartBody.Part> parts);

}
